<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/pages/common/common.jsp"%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%@ include file="/pages/common/common.jsp"%>
<title>${rptInfo.rptName}</title>
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/scripts/jquery-easyUI/1.5.2/themes/metro/easyui.css" />
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/scripts/jquery-easyUI/1.5.2/themes/icon.css" />
	<script type="text/javascript" src="<%=request.getContextPath()%>/scripts/jquery-easyUI/1.5.2/jquery.min.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath()%>/scripts/jquery-easyUI/1.5.2/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath()%>/scripts/jquery-easyUI/1.5.2/locale/easyui-lang-zh_CN.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath()%>/scripts/jquery-easyUI/1.5.2/datagrid-cellediting.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath()%>/scripts/My97DatePicker/WdatePicker.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath()%>/scripts/page/showRptInfo.js"></script>
    <script type="text/javascript" src="<%=request.getContextPath()%>/scripts/fSelect.js"></script>
    <script type="application/javascript">
        var basePath = "${pageContext.request.contextPath}";
    </script>
    <style type="text/css">
        .div-left {
            float:left;
            width:13%;
            height:98%;
            overflow-y:auto;
        }
        .div-right {
            float:right;width:87%;
            height: 98%;
        }
        .div-title {
            background-color: #f5f5f5;
            color: #444;
            height: 38px;
            line-height:38px;
            vertical-align: middle;
            cursor:hand;
            font-size: 16px;
            border-left: 5px solid #1dce0f;
            padding-left: 20px;
        }
        .div-idx {
            background-color: #0ca1fb;
            color: #fff;
            height: 28px;
            line-height:30px;
            padding-left: 10px;
            vertical-align: middle;
            cursor:hand;
            font-size: 13px;
            border-top:1px solid #ddd;
            border-bottom: 1px solid #ddd;
        }
        .li-style {
            padding-left: 20px;
            padding-bottom: 10px;
        }
        .tb-ul {
            overflow:hidden;
            width:100%;
            margin:0 auto;
            text-align:center;
        }
        .tb-li {
            list-style:none;
            text-align: left;
            float:left;
            width:25%;
            padding-top: 5px;
        }
        .more {
            padding-left: 10px;
            cursor:hand;
        }
        .div-left::-webkit-scrollbar { /*滚动条整体样式*/
            width: 10px;     /*高宽分别对应横竖滚动条的尺寸*/
            height: 1px;
        }
        .div-left::-webkit-scrollbar-thumb {/*滚动条里面小方块*/
            border-radius: 10px;
            -webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
            background: #CDC9C9;
        }
        .div-left::-webkit-scrollbar-track {/*滚动条里面轨道*/
            -webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
            border-radius: 10px;
            background: #EDEDED;
        }

        /*维度复选框样式*/
        #dim {
            margin-right: 10px;
            cursor: pointer;
            width: 15px;
            height: 15px;
            position: relative;
        }

        #dim:after {
            position: absolute;
            width: 10px;
            height: 15px;
            top: 0;
            content: " ";
            background-color: #fff;
            color: #fff;
            display: inline-block;
            visibility: visible;
            border: 1px solid #1dce0f;
            padding: 0 3px;
            border-radius: 3px;
        }

        #dim:checked:after {
            background-color: #1dce0f;
            content: "✓";
            font-size: 12px;
        }

        #dim:disabled:after {
            width: 10px;
            height: 15px;
            top: 0;
            color: #fff;
            display: inline-block;
            visibility: visible;
            border: 1px solid grey;
            padding: 0 3px;
            border-radius: 3px;
            background-color: #E9E7E3;
            content: "✓";
            font-size: 12px;
        }

        /*指标复选框样式*/
        #idx {
            margin-right: 10px;
            cursor: pointer;
            width: 15px;
            height: 15px;
            position: relative;
        }

        #idx:after {
            position: absolute;
            width: 10px;
            height: 15px;
            top: 0;
            content: " ";
            background-color: #fff;
            color: #fff;
            display: inline-block;
            visibility: visible;
            border: 1px solid #0ca1fb;
            padding: 0 3px;
            border-radius: 3px;
        }

        #idx:checked:after {
            background-color: #0f97e7;
            content: "✓";
            font-size: 12px;
        }

        #idx:disabled:after {
            width: 10px;
            height: 15px;
            top: 0;
            color: #fff;
            display: inline-block;
            visibility: visible;
            border: 1px solid grey;
            padding: 0 3px;
            border-radius: 3px;
            background-color: #E9E7E3;
            content: "✓";
            font-size: 12px;
        }
    </style>
</head>

<body onload="onLoadFun();">
	<div class="div-left">
        <c:if test="${!empty dimColumns}">
            <div class="div-title" onclick="showRptInfo.selectAllDim()">维&nbsp;度</div>
            <ul>
                <c:forEach items="${dimColumns}" var="dimColumn" varStatus="status">
                    <li class="li-style" <c:if test="${status.count == 1 }">style="padding-top: 10px;"</c:if> <c:if test="${dimColumn.isVisibility == '0'}"> style="display: none;" </c:if>>
                        <c:choose>
                            <c:when test="${empty dimColumn.aliasName}">
                                <input type="checkbox" id="dim" name="rptDim" <c:if test="${dimColumn.isSelect == 1}">checked ="checked"</c:if> value="${dimColumn.aliasField}">&nbsp;${dimColumn.name}
                            </c:when>
                            <c:otherwise>
                                <input type="checkbox" id="dim" name="rptDim" <c:if test="${dimColumn.isSelect == 1}">checked ="checked"</c:if> value="${dimColumn.aliasField}">&nbsp;${dimColumn.aliasName}
                            </c:otherwise>
                        </c:choose>
                    </li>
                </c:forEach>
            </ul>
        </c:if>
        <c:if test="${!empty sumIdxColumns}">
            <div class="div-title" onclick="showRptInfo.selectAllIdx()" <c:if test="${!empty dimColumns}">style="margin-top: 10px;border-left: 5px solid #0ca1fb;"</c:if>>指&nbsp;标</div>
            <c:if test="${!empty groupInfo}">
                <c:forEach items="${groupInfo}" var="groupInfo" varStatus="status">
                    <div class="div-idx" onclick="showRptInfo.selectSubIdx(this)">
                        <span><img src="<%=request.getContextPath()%>/styles/imgs/up.png" style="vertical-align:middle;" onclick="showRptInfo.swithcIdx(this)"></span>
                        <span style="padding-left: 5px;">${groupInfo}</span>
                    </div>
                    <ul>
                        <c:forEach items="${idxGroupColumnns[groupInfo]}" var="idxColumn" varStatus="status">
                            <li class="li-style" <c:if test="${status.count == 1 }">style="padding-top: 10px;"</c:if> <c:if test="${idxColumn.isVisibility == '0'}"> style="display: none;" </c:if>>
                                <c:choose>
                                    <c:when test="${empty idxColumn.aliasName}">
                                        <input type="checkbox" id="idx" name="rptIdx" <c:if test="${idxColumn.isSelect == 1 || empty idxColumn.isSelect}">checked ="checked"</c:if> value="${idxColumn.aliasField}">&nbsp;${idxColumn.name}
                                    </c:when>
                                    <c:otherwise>
                                        <input type="checkbox" id="idx" name="rptIdx" <c:if test="${idxColumn.isSelect == 1 || empty idxColumn.isSelect}">checked ="checked"</c:if> value="${idxColumn.aliasField}">&nbsp;${idxColumn.aliasName}
                                    </c:otherwise>
                                </c:choose>
                            </li>
                        </c:forEach>
                    </ul>
                </c:forEach>
            </c:if>
            <c:if test="${!empty idxColumns}">
                <ul>
                    <c:forEach items="${idxColumns}" var="idxColumn" varStatus="status">
                        <li class="li-style" <c:if test="${status.count == 1 }">style="padding-top: 10px;"</c:if> <c:if test="${idxColumn.isVisibility == '0'}"> style="display: none;" </c:if>>
                            <c:choose>
                                <c:when test="${empty idxColumn.aliasName}">
                                    <input type="checkbox" id="idx" name="rptIdx" <c:if test="${idxColumn.isSelect == 1 || empty idxColumn.isSelect}">checked ="checked"</c:if> value="${idxColumn.aliasField}">&nbsp;${idxColumn.name}
                                </c:when>
                                <c:otherwise>
                                    <input type="checkbox" id="idx" name="rptIdx" <c:if test="${idxColumn.isSelect == 1 || empty idxColumn.isSelect}">checked ="checked"</c:if> value="${idxColumn.aliasField}">&nbsp;${idxColumn.aliasName}
                                </c:otherwise>
                            </c:choose>
                        </li>
                    </c:forEach>
                </ul>
            </c:if>
        </c:if>
    </div>
    <div class="div-right">
        <table id="dg" class="easyui-datagrid" title="${rptInfo.rptName}" data-options="singleSelect:true,toolbar:'#tb',collapsible:true,method:'POST',
							rownumbers: false" style="width:100%;height:100%;">
        </table>

        <!--动态生成查询条件-->
        <div id="tb" style="height:auto">
            <input type="hidden" id="rptId" name="rptId" value="${rptId}">
            <input type="hidden" id="conditionCol" name="conditionCol" value="${conditionColumns}">
            <input type="hidden" id="initCondition" name="initCondition" value="${initConditions}">
            <input type="hidden" id="rptToken" name="rptToken" value="${rptInfo.rptToken}">
            <input type="hidden" id="userId" name="userId" value="${userId}">
            <input type="hidden" id="userKey" name="userKey" value="${userKey}">
            <input type="hidden" id="itemCode" name="itemCode" value="${itemCode}">
            <c:choose>
                <c:when test="${rptInfo.isHideCondition == '1'}"> <!--查询条件需要隐藏-->
                    <c:choose>
                        <c:when test="${empty rptInfo.conditionColumns}">
                            <c:if test="${rptInfo.needQuery == '1'}">
                                <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" onclick="showRptInfo.analysisQuery();">查询</a>
                            </c:if>
                            <c:if test="${rptInfo.needImport == '1'}">
                                <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-excel',plain:true" onclick="showRptInfo.analysisExcelDownLoad()">导出Excel</a>
                            </c:if>
                            <c:if test="${rptInfo.needOffLine == '1'}">
                                <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-offline',plain:true" onclick="showRptInfo.analysisOffLineDownLoad('${rptInfo.rptName}')">离线下载</a>
                            </c:if>
                            <c:if test="${rptInfo.selfDefine == '1'}">
                                <a href="#" class="easyui-linkbutton" iconCls="icon-selfDefine" onclick="showRptInfo.analysisSelfDefine('${rptInfo.rptName}');">自定义报表</a>
                            </c:if>
                        </c:when>
                        <c:otherwise>
                            <!--显示的查询条件-->
                            <div style="padding-left: 10px;">
                                <ul class="tb-ul">
                                    <c:set var="count" value="0"/>
                                    <c:forEach items="${showColumns}" var="condition" varStatus="status">
                                        <c:if test="${count % 4 == 0}">
                                        <%--<div style="padding-top:5px;"></div>--%>
                                            <ul class="tb-ul">
                                        </c:if>
                                        <c:choose>
                                            <c:when test="${condition.conditionType == '1'}">  <!-- 查询类型-输入框-->
                                                <li class="tb-li" <c:if test="${condition.isVisibility == '0'}"> style="display: none;" </c:if>>
                                                    <c:if test="${condition.isVisibility != '0'}">
                                                        <c:set value="${count + 1}" var="count" />
                                                    </c:if>
                                                    <label>${empty condition.aliasName ? condition.name : condition.aliasName}:</label>
                                                    <input class="easyui-textbox" id="${condition.aliasField}" value="${condition.defaultValue}" format="${condition.dynamicFormat}" numberFomat="${condition.numberFormat}" style="width:100px;height:25px">
                                                    <c:if test="${condition.dynamicFormat == 'formatType'}">
                                                        <span name="formatType">${condition.countType}</span> <!--计数方式-->
                                                    </c:if>
                                                    <span>${condition.unit}</span>
                                                    <c:if test="${condition.isNeed == '1'}">
                                                        <span><font color='red'>*</font></span>
                                                    </c:if>

                                                    <c:if test="${count % 4 == 0}">
                                                        <span class="more" onmousemove="showRptInfo.moreOver(this)" onmouseout="showRptInfo.moreOut(this)" onclick="showRptInfo.showMore(this)">
                                                            更多选项
                                                        </span>
                                                        <img src="<%=request.getContextPath()%>/styles/imgs/arrow_down.png" style="vertical-align:middle;">
                                                    </c:if>
                                                </li>
                                            </c:when>
                                            <c:when test="${condition.conditionType == '2'}">  <!-- 查询类型-下拉框 -->
                                                <li class="tb-li" <c:if test="${condition.isVisibility == '0'}"> style="display: none;" </c:if>>
                                                    <c:if test="${condition.isVisibility != '0'}">
                                                        <c:set value="${count + 1}" var="count" />
                                                    </c:if>
                                                    <label>${empty condition.aliasName ? condition.name : condition.aliasName}:</label>
                                                    <c:choose>
                                                        <c:when test="${condition.aliasField == 'formatType'}"> <!--动态格式化数字-->
                                                            <select class="ui-select" style="height: 27px;width:100px;padding-left: 2px;" id="${condition.aliasField}" name="${condition.aliasField}" onchange="showRptInfo.resetUnit()">
                                                                <c:forEach items="${condition.optionValue}" var="option">
                                                                    <option value="${option.key}"<c:if test="${option.key == condition.defaultValue}"> selected</c:if>>${option.value}</option>
                                                                </c:forEach>
                                                            </select>
                                                        </c:when>
                                                        <c:when test="${condition.aliasField == 'dateType'}"> <!--动态格式化日期-->
                                                            <select class="ui-select" style="height: 27px;width:100px;padding-left: 2px;" id="${condition.aliasField}" name="${condition.aliasField}" onchange="showRptInfo.foratterDate('${condition.cascadeDate}','${condition.cascadeCondition}')">
                                                                <c:forEach items="${condition.optionValue}" var="option">
                                                                    <option value="${option.key}"<c:if test="${option.key == condition.defaultValue}"> selected</c:if>>${option.value}</option>
                                                                </c:forEach>
                                                            </select>
                                                        </c:when>
                                                        <c:otherwise>
                                                            <select class="ui-select" style="height: 27px;width:100px;padding-left: 2px;" id="${condition.aliasField}" name="${condition.aliasField}">
                                                                <c:forEach items="${condition.optionValue}" var="option">
                                                                    <option value="${option.key}"<c:if test="${option.key == condition.defaultValue}"> selected</c:if>>${option.value}</option>
                                                                </c:forEach>
                                                            </select>
                                                        </c:otherwise>
                                                    </c:choose>
                                                        <%--<select class="ui-select" style="height: 27px;width:130px;" id="${condition.aliasField}" name="${condition.aliasField}"
                                                                <c:if test="${condition.aliasField == 'formatType'}"> onchange="showRptInfo.analysisQuery()"</c:if>>
                                                            <c:forEach items="${condition.optionValue}" var="option">
                                                                <option value="${option.key}">${option.value}</option>
                                                            </c:forEach>
                                                        </select>--%>
                                                    <c:if test="${condition.dynamicFormat == 'formatType'}">
                                                        <span name="formatType">${condition.countType}</span>
                                                    </c:if>
                                                    <span>${condition.unit}</span>
                                                    <c:if test="${condition.isNeed == '1'}">
                                                        <span><font color='red'>*</font></span>
                                                    </c:if>

                                                    <c:if test="${count % 4 == 0}">
                                                        <span class="more" onmousemove="showRptInfo.moreOver(this)" onmouseout="showRptInfo.moreOut(this)" onclick="showRptInfo.showMore(this)">
                                                            更多选项
                                                        </span>
                                                        <img src="<%=request.getContextPath()%>/styles/imgs/arrow_down.png" style="vertical-align:middle;">
                                                    </c:if>
                                                </li>
                                            </c:when>
                                            <c:when test="${condition.conditionType == '3'}">  <!-- 查询类型 - 日期 -->
                                                <li class="tb-li" <c:if test="${condition.isVisibility == '0'}"> style="display: none;" </c:if>>
                                                    <c:if test="${condition.isVisibility != '0'}">
                                                        <c:set value="${count + 1}" var="count" />
                                                    </c:if>
                                                    <label>${empty condition.aliasName ? condition.name : condition.aliasName}:</label>
                                                    <input autocomplete="off" id="${condition.aliasField}" name="${condition.aliasField}" value="${condition.defaultValue}" style="margin-top: 1px;width:100px;" onFocus="WdatePicker({onpicked:function() {},dateFmt:'${condition.formatter}'})" type="text" class="Wdate">
                                                    <c:if test="${condition.isNeed == '1'}">
                                                        <span><font color='red'>*</font></span>
                                                    </c:if>

                                                    <c:if test="${count % 4 == 0}">
                                                        <span class="more" onmousemove="showRptInfo.moreOver(this)" onmouseout="showRptInfo.moreOut(this)" onclick="showRptInfo.showMore(this)">
                                                            更多选项
                                                        </span>
                                                        <img src="<%=request.getContextPath()%>/styles/imgs/arrow_down.png" style="vertical-align:middle;">
                                                    </c:if>
                                                </li>
                                            </c:when>
                                            <c:when test="${condition.conditionType == '4'}">  <!--查询类型 - 日期区间-->
                                                <li class="tb-li" <c:if test="${condition.isVisibility == '0'}"> style="display: none;" </c:if>>
                                                    <c:if test="${condition.isVisibility != '0'}">
                                                        <c:set value="${count + 1}" var="count" />
                                                    </c:if>
                                                    <label>起始时间: </label>
                                                    <input autocomplete="off" id="${condition.aliasField}_start" name="${condition.aliasField}_start" value="${condition.defaultValue}" style="margin-top: 1px;width:100px;" onFocus="WdatePicker({onpicked:function() {},dateFmt:'${condition.formatter}'})" type="text" class="Wdate">
                                                    <c:if test="${condition.isNeed == '1'}">
                                                        <span><font color='red'>*</font></span>
                                                    </c:if>

                                                    <c:if test="${count % 4 == 0}">
                                                        <span class="more" onmousemove="showRptInfo.moreOver(this)" onmouseout="showRptInfo.moreOut(this)" onclick="showRptInfo.showMore(this)">
                                                            更多选项
                                                        </span>
                                                        <img src="<%=request.getContextPath()%>/styles/imgs/arrow_down.png" style="vertical-align:middle;">
                                                    </c:if>
                                                </li>
                                                <c:if test="${count % 4 == 0}">
                                                    <%--<div style="padding-top:5px;"></div>--%>
                                                    <ul class="tb-ul">
                                                </c:if>
                                                <li class="tb-li" <c:if test="${condition.isVisibility == '0'}"> style="display: none;" </c:if>>
                                                    <c:if test="${condition.isVisibility != '0'}">
                                                        <c:set value="${count + 1}" var="count" />
                                                    </c:if>
                                                    <label>结束时间: </label>
                                                    <input autocomplete="off" id="${condition.aliasField}_end" name="${condition.aliasField}_end" value="${condition.defaultValueEnd}" style="margin-top: 1px;width:100px;" onFocus="WdatePicker({minDate:'#F{$dp.$D(\'${condition.aliasField}_start\')}',onpicked:function() {},dateFmt:'${condition.formatter}'})" type="text" class="Wdate">
                                                    <c:if test="${condition.isNeed == '1'}">
                                                        <span><font color='red'>*</font></span>
                                                    </c:if>

                                                    <c:if test="${count % 4 == 0}">
                                                        <span class="more" onmousemove="showRptInfo.moreOver(this)" onmouseout="showRptInfo.moreOut(this)" onclick="showRptInfo.showMore(this)">
                                                            更多选项
                                                        </span>
                                                        <img src="<%=request.getContextPath()%>/styles/imgs/arrow_down.png" style="vertical-align:middle;">
                                                    </c:if>
                                                </li>
                                            </c:when>
                                            <c:when test="${condition.conditionType == '5'}">  <!--查询类型 - 树-->
                                                <li class="tb-li" <c:if test="${condition.isVisibility == '0'}"> style="display: none;" </c:if>>
                                                    <c:if test="${condition.isVisibility != '0'}">
                                                        <c:set value="${count + 1}" var="count" />
                                                    </c:if>
                                                    <label>${empty condition.aliasName ? condition.name : condition.aliasName}:</label>
                                                    <input type="text" autocomplete="off" name="${condition.aliasField}" id="${condition.aliasField}Id" value="${condition.defaultName}" style="width:100px;height:24px;font-size:12px;" onclick="selectMyOrgTree('${rptId}','${condition.aliasField}','${condition.treeDim.rightParam}','${condition.treeDim.parentRightParam}','${condition.treeDim.needSearch}','${condition.aliasField}Id','hid_${condition.aliasField}','${condition.multiTreeMode}');">
                                                    <input type="hidden" name="${condition.aliasField}s" id="hid_${condition.aliasField}" value="'${condition.defaultValue}'">
                                                    <c:if test="${condition.dynamicFormat == 'formatType'}">
                                                        <span name="formatType">${condition.countType}</span>
                                                    </c:if>
                                                    <span>${condition.unit}</span>
                                                    <c:if test="${condition.isNeed == '1'}">
                                                        <span><font color='red'>*</font></span>
                                                    </c:if>

                                                    <c:if test="${count % 4 == 0}">
                                                        <span class="more" onmousemove="showRptInfo.moreOver(this)" onmouseout="showRptInfo.moreOut(this)" onclick="showRptInfo.showMore(this)">
                                                            更多选项
                                                        </span>
                                                        <img src="<%=request.getContextPath()%>/styles/imgs/arrow_down.png" style="vertical-align:middle;">
                                                    </c:if>
                                                </li>
                                            </c:when>
                                            <c:when test="${condition.conditionType == '6'}">  <!-- 查询类型-值区间-->
                                                <li class="tb-li" <c:if test="${condition.isVisibility == '0'}"> style="display: none;" </c:if>>
                                                    <c:if test="${condition.isVisibility != '0'}">
                                                        <c:set value="${count + 1}" var="count" />
                                                    </c:if>
                                                    <label>${empty condition.aliasName ? condition.name : condition.aliasName}:</label>
                                                    <input class="easyui-textbox" id="${condition.aliasField}_start" value="${condition.defaultValue}" format="${condition.dynamicFormat}" numberFomat="${condition.numberFormat}" style="width:50px;height:25px">
                                                    <c:if test="${condition.isNeed == '1'}">
                                                        <span><font color='red'>*</font></span>
                                                    </c:if>
                                                    &nbsp;至&nbsp;
                                                    <input class="easyui-textbox" id="${condition.aliasField}_end" value="${condition.defaultValueEnd}" format="${condition.dynamicFormat}" numberFomat="${condition.numberFormat}" style="width:50px;height:25px">
                                                    <c:if test="${condition.dynamicFormat == 'formatType'}">
                                                        <span name="formatType">${condition.countType}</span>
                                                    </c:if>
                                                    <span>${condition.unit}</span>
                                                    <c:if test="${condition.isNeed == '1'}">
                                                        <span><font color='red'>*</font></span>
                                                    </c:if>

                                                    <c:if test="${count % 4 == 0}">
                                                        <span class="more" onmousemove="showRptInfo.moreOver(this)" onmouseout="showRptInfo.moreOut(this)" onclick="showRptInfo.showMore(this)">
                                                            更多选项
                                                        </span>
                                                        <img src="<%=request.getContextPath()%>/styles/imgs/arrow_down.png" style="vertical-align:middle;">
                                                    </c:if>
                                                </li>
                                            </c:when>
                                            <c:when test="${condition.conditionType == '7'}">  <!-- 查询类型-多选下拉框 -->
                                                <li class="tb-li" <c:if test="${condition.isVisibility == '0'}"> style="display: none;" </c:if>>
                                                    <c:if test="${condition.isVisibility != '0'}">
                                                        <c:set value="${count + 1}" var="count" />
                                                    </c:if>
                                                    <label>${empty condition.aliasName ? condition.name : condition.aliasName}:</label>
                                                    <select class="multiSelect" multiple="multiple" id="${condition.aliasField}" name="${condition.aliasField}" width="46%">
                                                        <option value="">全选</option>
                                                        <c:forEach items="${condition.optionValue}" var="option">
                                                            <option <c:if test="${condition.mutiSelectDefault[option.key]}"> selected</c:if> value="${option.key}">${option.value}</option>
                                                        </c:forEach>
                                                    </select>
                                                    <c:if test="${condition.dynamicFormat == 'formatType'}">
                                                        <span name="formatType">${condition.countType}</span>
                                                    </c:if>
                                                    <span>${condition.unit}</span>
                                                    <c:if test="${condition.isNeed == '1'}">
                                                        <span><font color='red'>*</font></span>
                                                    </c:if>

                                                    <c:if test="${count % 4 == 0}">
                                                        <span class="more" onmousemove="showRptInfo.moreOver(this)" onmouseout="showRptInfo.moreOut(this)" onclick="showRptInfo.showMore(this)">
                                                            更多选项
                                                        </span>
                                                        <img src="<%=request.getContextPath()%>/styles/imgs/arrow_down.png" style="vertical-align:middle;">
                                                    </c:if>
                                                </li>
                                            </c:when>
                                        </c:choose>
                                    </c:forEach>
                                    <%--<li class="tb-li">
                                        <a href="#" class="easyui-linkbutton" iconCls="icon-search" onclick="showRptInfo.analysisQuery();">查询</a>
                                        <c:if test="${rptInfo.needImport == '1'}">
                                            <a href="#" id="exportBtn" class="easyui-linkbutton" iconCls="icon-excel" onclick="showRptInfo.analysisExcelDownLoad();">导出Excel</a>
                                        </c:if>
                                        <a href="#" class="easyui-linkbutton" iconCls="icon-search" onclick="showRptInfo.showMore();">更多</a>
                                    </li>--%>
                                    <c:if test="${count % 4 == 0}">
                                        </ul>
                                    </c:if>
                                </ul>
                            </div>
                            <!--隐藏的查询条件-->
                            <div id="hideCondition" style="padding-left: 10px; display: none;">
                                <ul class="tb-ul">
                                    <c:set var="count" value="0"/>
                                    <c:forEach items="${notNeedColumns}" var="condition" varStatus="status">
                                        <c:if test="${count % 4 == 0}">
                                            <%--<div style="padding-top:5px;"></div>--%>
                                            <ul class="tb-ul">
                                        </c:if>
                                        <c:choose>
                                            <c:when test="${condition.conditionType == '1'}">  <!-- 查询类型-输入框-->
                                                <li class="tb-li" <c:if test="${condition.isVisibility == '0'}"> style="display: none;" </c:if>>
                                                    <c:if test="${condition.isVisibility != '0'}">
                                                        <c:set value="${count + 1}" var="count" />
                                                    </c:if>
                                                    <label>${empty condition.aliasName ? condition.name : condition.aliasName}:</label>
                                                    <input class="easyui-textbox" id="${condition.aliasField}" value="${condition.defaultValue}" format="${condition.dynamicFormat}" numberFomat="${condition.numberFormat}" style="width:100px;height:25px">
                                                    <c:if test="${condition.dynamicFormat == 'formatType'}">
                                                        <span name="formatType">${condition.countType}</span> <!--计数方式-->
                                                    </c:if>
                                                    <span>${condition.unit}</span>
                                                    <c:if test="${condition.isNeed == '1'}">
                                                        <span><font color='red'>*</font></span>
                                                    </c:if>
                                                </li>
                                            </c:when>
                                            <c:when test="${condition.conditionType == '2'}">  <!-- 查询类型-下拉框 -->
                                                <li class="tb-li" <c:if test="${condition.isVisibility == '0'}"> style="display: none;" </c:if>>
                                                    <c:if test="${condition.isVisibility != '0'}">
                                                        <c:set value="${count + 1}" var="count" />
                                                    </c:if>
                                                    <label>${empty condition.aliasName ? condition.name : condition.aliasName}:</label>
                                                    <c:choose>
                                                        <c:when test="${condition.aliasField == 'formatType'}"> <!--动态格式化数字-->
                                                            <select class="ui-select" style="height: 27px;width:100px;padding-left: 2px;" id="${condition.aliasField}" name="${condition.aliasField}" onchange="showRptInfo.resetUnit()">
                                                                <c:forEach items="${condition.optionValue}" var="option">
                                                                    <option value="${option.key}"<c:if test="${option.key == condition.defaultValue}"> selected</c:if>>${option.value}</option>
                                                                </c:forEach>
                                                            </select>
                                                        </c:when>
                                                        <c:when test="${condition.aliasField == 'dateType'}"> <!--动态格式化日期-->
                                                            <select class="ui-select" style="height: 27px;width:100px;padding-left: 2px;" id="${condition.aliasField}" name="${condition.aliasField}" onchange="showRptInfo.foratterDate('${condition.cascadeDate}','${condition.cascadeCondition}')">
                                                                <c:forEach items="${condition.optionValue}" var="option">
                                                                    <option value="${option.key}"<c:if test="${option.key == condition.defaultValue}"> selected</c:if>>${option.value}</option>
                                                                </c:forEach>
                                                            </select>
                                                        </c:when>
                                                        <c:otherwise>
                                                            <select class="ui-select" style="height: 27px;width:100px;padding-left: 2px;" id="${condition.aliasField}" name="${condition.aliasField}">
                                                                <c:forEach items="${condition.optionValue}" var="option">
                                                                    <option value="${option.key}"<c:if test="${option.key == condition.defaultValue}"> selected</c:if>>${option.value}</option>
                                                                </c:forEach>
                                                            </select>
                                                        </c:otherwise>
                                                    </c:choose>
                                                        <%--<select class="ui-select" style="height: 27px;width:130px;" id="${condition.aliasField}" name="${condition.aliasField}"
                                                                <c:if test="${condition.aliasField == 'formatType'}"> onchange="showRptInfo.analysisQuery()"</c:if>>
                                                            <c:forEach items="${condition.optionValue}" var="option">
                                                                <option value="${option.key}">${option.value}</option>
                                                            </c:forEach>
                                                        </select>--%>
                                                    <c:if test="${condition.dynamicFormat == 'formatType'}">
                                                        <span name="formatType">${condition.countType}</span>
                                                    </c:if>
                                                    <span>${condition.unit}</span>
                                                    <c:if test="${condition.isNeed == '1'}">
                                                        <span><font color='red'>*</font></span>
                                                    </c:if>
                                                </li>
                                            </c:when>
                                            <c:when test="${condition.conditionType == '3'}">  <!-- 查询类型 - 日期 -->
                                                <li class="tb-li" <c:if test="${condition.isVisibility == '0'}"> style="display: none;" </c:if>>
                                                    <c:if test="${condition.isVisibility != '0'}">
                                                        <c:set value="${count + 1}" var="count" />
                                                    </c:if>
                                                    <label>${empty condition.aliasName ? condition.name : condition.aliasName}:</label>
                                                    <input autocomplete="off" id="${condition.aliasField}" name="${condition.aliasField}" value="${condition.defaultValue}" style="margin-top: 1px;width:100px;" onFocus="WdatePicker({onpicked:function() {},dateFmt:'${condition.formatter}'})" type="text" class="Wdate">
                                                    <c:if test="${condition.isNeed == '1'}">
                                                        <span><font color='red'>*</font></span>
                                                    </c:if>
                                                </li>
                                            </c:when>
                                            <c:when test="${condition.conditionType == '4'}">  <!--查询类型 - 日期区间-->
                                                <li class="tb-li" <c:if test="${condition.isVisibility == '0'}"> style="display: none;" </c:if>>
                                                    <c:if test="${condition.isVisibility != '0'}">
                                                        <c:set value="${count + 1}" var="count" />
                                                    </c:if>
                                                    <label>起始时间: </label>
                                                    <input autocomplete="off" id="${condition.aliasField}_start" name="${condition.aliasField}_start" value="${condition.defaultValue}" style="margin-top: 1px;width:100px;" onFocus="WdatePicker({onpicked:function() {},dateFmt:'${condition.formatter}'})" type="text" class="Wdate">
                                                    <c:if test="${condition.isNeed == '1'}">
                                                        <span><font color='red'>*</font></span>
                                                    </c:if>
                                                </li>
                                                <c:if test="${count % 4 == 0}">
                                                    <%--<div style="padding-top:5px;"></div>--%>
                                                    <ul class="tb-ul">
                                                </c:if>
                                                <li class="tb-li" <c:if test="${condition.isVisibility == '0'}"> style="display: none;" </c:if>>
                                                    <c:if test="${condition.isVisibility != '0'}">
                                                        <c:set value="${count + 1}" var="count" />
                                                    </c:if>
                                                    <label>结束时间: </label>
                                                    <input autocomplete="off" id="${condition.aliasField}_end" name="${condition.aliasField}_end" value="${condition.defaultValueEnd}" style="margin-top: 1px;width:100px;" onFocus="WdatePicker({minDate:'#F{$dp.$D(\'${condition.aliasField}_start\')}',onpicked:function() {},dateFmt:'${condition.formatter}'})" type="text" class="Wdate">
                                                    <c:if test="${condition.isNeed == '1'}">
                                                        <span><font color='red'>*</font></span>
                                                    </c:if>
                                                </li>
                                            </c:when>
                                            <c:when test="${condition.conditionType == '5'}">  <!--查询类型 - 树-->
                                                <li class="tb-li" <c:if test="${condition.isVisibility == '0'}"> style="display: none;" </c:if>>
                                                    <c:if test="${condition.isVisibility != '0'}">
                                                        <c:set value="${count + 1}" var="count" />
                                                    </c:if>
                                                    <label>${empty condition.aliasName ? condition.name : condition.aliasName}:</label>
                                                    <input type="text" autocomplete="off" name="${condition.aliasField}" id="${condition.aliasField}Id" value="${condition.defaultName}" style="width:100px;height:24px;font-size:12px;" onclick="selectMyOrgTree('${rptId}','${condition.aliasField}','${condition.treeDim.rightParam}','${condition.treeDim.parentRightParam}','${condition.treeDim.needSearch}','${condition.aliasField}Id','hid_${condition.aliasField}','${condition.multiTreeMode}');">
                                                    <input type="hidden" name="${condition.aliasField}s" id="hid_${condition.aliasField}" value="'${condition.defaultValue}'">
                                                    <c:if test="${condition.dynamicFormat == 'formatType'}">
                                                        <span name="formatType">${condition.countType}</span>
                                                    </c:if>
                                                    <span>${condition.unit}</span>
                                                    <c:if test="${condition.isNeed == '1'}">
                                                        <span><font color='red'>*</font></span>
                                                    </c:if>
                                                </li>
                                            </c:when>
                                            <c:when test="${condition.conditionType == '6'}">  <!-- 查询类型-值区间-->
                                                <li class="tb-li" <c:if test="${condition.isVisibility == '0'}"> style="display: none;" </c:if>>
                                                    <c:if test="${condition.isVisibility != '0'}">
                                                        <c:set value="${count + 1}" var="count" />
                                                    </c:if>
                                                    <label>${empty condition.aliasName ? condition.name : condition.aliasName}:</label>
                                                    <input class="easyui-textbox" id="${condition.aliasField}_start" value="${condition.defaultValue}" format="${condition.dynamicFormat}" numberFomat="${condition.numberFormat}" style="width:50px;height:25px">
                                                    <c:if test="${condition.isNeed == '1'}">
                                                        <span><font color='red'>*</font></span>
                                                    </c:if>
                                                    &nbsp;至&nbsp;
                                                    <input class="easyui-textbox" id="${condition.aliasField}_end" value="${condition.defaultValueEnd}" format="${condition.dynamicFormat}" numberFomat="${condition.numberFormat}" style="width:50px;height:25px">
                                                    <c:if test="${condition.dynamicFormat == 'formatType'}">
                                                        <span name="formatType">${condition.countType}</span>
                                                    </c:if>
                                                    <span>${condition.unit}</span>
                                                    <c:if test="${condition.isNeed == '1'}">
                                                        <span><font color='red'>*</font></span>
                                                    </c:if>
                                                </li>
                                            </c:when>
                                            <c:when test="${condition.conditionType == '7'}">  <!-- 查询类型-多选下拉框 -->
                                                <li class="tb-li" <c:if test="${condition.isVisibility == '0'}"> style="display: none;" </c:if>>
                                                    <c:if test="${condition.isVisibility != '0'}">
                                                        <c:set value="${count + 1}" var="count" />
                                                    </c:if>
                                                    <label>${empty condition.aliasName ? condition.name : condition.aliasName}:</label>
                                                    <select class="multiSelect" multiple="multiple" id="${condition.aliasField}" name="${condition.aliasField}" width="46%">
                                                        <option value="">全选</option>
                                                        <c:forEach items="${condition.optionValue}" var="option">
                                                            <option <c:if test="${condition.mutiSelectDefault[option.key]}"> selected</c:if> value="${option.key}">${option.value}</option>
                                                        </c:forEach>
                                                    </select>
                                                    <c:if test="${condition.dynamicFormat == 'formatType'}">
                                                        <span name="formatType">${condition.countType}</span>
                                                    </c:if>
                                                    <span>${condition.unit}</span>
                                                    <c:if test="${condition.isNeed == '1'}">
                                                        <span><font color='red'>*</font></span>
                                                    </c:if>
                                                </li>
                                            </c:when>
                                        </c:choose>
                                    </c:forEach>
                                    <c:if test="${count % 4 == 0}">
                                        </ul>
                                    </c:if>
                                </ul>
                            </div>
                        </c:otherwise>
                    </c:choose>
                    <ul class="tb-ul" style="padding-bottom: 5px;padding-left: 10px;">
                        <li class="tb-li" style="width:28%">
                            <c:if test="${rptInfo.needQuery == '1'}">
                                <a href="#" class="easyui-linkbutton" iconCls="icon-search" onclick="showRptInfo.analysisQuery();">查询</a>
                            </c:if>
                            <c:if test="${rptInfo.needImport == '1'}">
                                <a href="#" id="exportBtn" class="easyui-linkbutton" iconCls="icon-excel" onclick="showRptInfo.analysisExcelDownLoad();">导出Excel</a>
                            </c:if>
                            <c:if test="${rptInfo.needOffLine == '1'}">
                                <a href="#" id="offLineBtn" class="easyui-linkbutton" iconCls="icon-offline" onclick="showRptInfo.analysisOffLineDownLoad('${rptInfo.rptName}');">离线下载</a>
                            </c:if>
                            <c:if test="${rptInfo.selfDefine == '1'}">
                                <a href="#" class="easyui-linkbutton" iconCls="icon-selfDefine" onclick="showRptInfo.analysisSelfDefine('${rptInfo.rptName}');">自定义报表</a>
                            </c:if>
                        </li>
                    </ul>
                </c:when>
                <c:otherwise> <!--查询条件不需要隐藏-->
                    <c:choose>
                        <c:when test="${empty rptInfo.conditionColumns}">
                            <c:if test="${rptInfo.needQuery == '1'}">
                                <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" onclick="showRptInfo.analysisQuery();">查询</a>
                            </c:if>
                            <c:if test="${rptInfo.needImport == '1'}">
                                <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-excel',plain:true" onclick="showRptInfo.analysisExcelDownLoad()">导出Excel</a>
                            </c:if>
                            <c:if test="${rptInfo.needOffLine == '1'}">
                                <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-offline',plain:true" onclick="showRptInfo.analysisOffLineDownLoad('${rptInfo.rptName}')">离线下载</a>
                            </c:if>
                            <c:if test="${rptInfo.selfDefine == '1'}">
                                <a href="#" class="easyui-linkbutton" iconCls="icon-selfDefine" onclick="showRptInfo.analysisSelfDefine('${rptInfo.rptName}');">自定义报表</a>
                            </c:if>
                        </c:when>
                        <c:otherwise>
                            <div style="padding:2px 5px;margin: 5px;">
                                <ul class="tb-ul">
                                    <c:set var="count" value="0"/>
                                    <c:forEach items="${rptInfo.conditionColumns}" var="condition" varStatus="status">
                                        <c:if test="${count % 4 == 0}">
                                            <%--<div style="padding-top:5px;"></div>--%>
                                            <ul class="tb-ul">
                                        </c:if>
                                        <c:choose>
                                            <c:when test="${condition.conditionType == '1'}">  <!-- 查询类型-输入框-->
                                                <li class="tb-li" <c:if test="${condition.isVisibility == '0'}"> style="display: none;" </c:if>>
                                                    <c:if test="${condition.isVisibility != '0'}">
                                                        <c:set value="${count + 1}" var="count" />
                                                    </c:if>
                                                    <label>${empty condition.aliasName ? condition.name : condition.aliasName}:</label>
                                                    <input class="easyui-textbox" id="${condition.aliasField}" value="${condition.defaultValue}" format="${condition.dynamicFormat}" numberFomat="${condition.numberFormat}" style="width:100px;height:25px">
                                                    <c:if test="${condition.dynamicFormat == 'formatType'}">
                                                        <span name="formatType">${condition.countType}</span> <!--计数方式-->
                                                    </c:if>
                                                    <span>${condition.unit}</span>
                                                    <c:if test="${condition.isNeed == '1'}">
                                                        <span><font color='red'>*</font></span>
                                                    </c:if>
                                                </li>
                                            </c:when>
                                            <c:when test="${condition.conditionType == '2'}">  <!-- 查询类型-下拉框 -->
                                                <li class="tb-li" <c:if test="${condition.isVisibility == '0'}"> style="display: none;" </c:if>>
                                                    <c:if test="${condition.isVisibility != '0'}">
                                                        <c:set value="${count + 1}" var="count" />
                                                    </c:if>
                                                    <label>${empty condition.aliasName ? condition.name : condition.aliasName}:</label>
                                                    <c:choose>
                                                        <c:when test="${condition.aliasField == 'formatType'}"> <!--动态格式化数字-->
                                                            <select class="ui-select" style="height: 27px;width:100px;padding-left: 2px;" id="${condition.aliasField}" name="${condition.aliasField}" onchange="showRptInfo.resetUnit()">
                                                                <c:forEach items="${condition.optionValue}" var="option">
                                                                    <option value="${option.key}" <c:if test="${option.key == condition.defaultValue}"> selected</c:if>>${option.value}</option>
                                                                </c:forEach>
                                                            </select>
                                                        </c:when>
                                                        <c:when test="${condition.aliasField == 'dateType'}"> <!--动态格式化日期-->
                                                            <select class="ui-select" style="height: 27px;width:100px;padding-left: 2px;" id="${condition.aliasField}" name="${condition.aliasField}" onchange="showRptInfo.foratterDate('${condition.cascadeDate}','${condition.cascadeCondition}')">
                                                                <c:forEach items="${condition.optionValue}" var="option">
                                                                    <option value="${option.key}"<c:if test="${option.key == condition.defaultValue}"> selected</c:if>>${option.value}</option>
                                                                </c:forEach>
                                                            </select>
                                                        </c:when>
                                                        <c:otherwise>
                                                            <select class="ui-select" style="height: 27px;width:100px;padding-left: 2px;" id="${condition.aliasField}" name="${condition.aliasField}">
                                                                <c:forEach items="${condition.optionValue}" var="option">
                                                                    <option value="${option.key}"<c:if test="${option.key == condition.defaultValue}"> selected</c:if>>${option.value}</option>
                                                                </c:forEach>
                                                            </select>
                                                        </c:otherwise>
                                                    </c:choose>
                                                        <%--<select class="ui-select" style="height: 27px;width:130px;" id="${condition.aliasField}" name="${condition.aliasField}"
                                                                <c:if test="${condition.aliasField == 'formatType'}"> onchange="showRptInfo.analysisQuery()"</c:if>>
                                                            <c:forEach items="${condition.optionValue}" var="option">
                                                                <option value="${option.key}">${option.value}</option>
                                                            </c:forEach>
                                                        </select>--%>
                                                    <c:if test="${condition.dynamicFormat == 'formatType'}">
                                                        <span name="formatType">${condition.countType}</span>
                                                    </c:if>
                                                    <span>${condition.unit}</span>
                                                    <c:if test="${condition.isNeed == '1'}">
                                                        <span><font color='red'>*</font></span>
                                                    </c:if>
                                                </li>
                                            </c:when>
                                            <c:when test="${condition.conditionType == '3'}">  <!-- 查询类型 - 日期 -->
                                                <li class="tb-li" <c:if test="${condition.isVisibility == '0'}"> style="display: none;" </c:if>>
                                                    <c:if test="${condition.isVisibility != '0'}">
                                                        <c:set value="${count + 1}" var="count" />
                                                    </c:if>
                                                    <label>${empty condition.aliasName ? condition.name : condition.aliasName}:</label>
                                                    <input autocomplete="off" id="${condition.aliasField}" name="${condition.aliasField}" value="${condition.defaultValue}" style="margin-top: 1px;width:100px;" onFocus="WdatePicker({onpicked:function() {},dateFmt:'${condition.formatter}'})" type="text" class="Wdate">
                                                    <c:if test="${condition.isNeed == '1'}">
                                                        <span><font color='red'>*</font></span>
                                                    </c:if>
                                                </li>
                                            </c:when>
                                            <c:when test="${condition.conditionType == '4'}">  <!--查询类型 - 日期区间-->
                                                <li class="tb-li" <c:if test="${condition.isVisibility == '0'}"> style="display: none;" </c:if>>
                                                    <c:if test="${condition.isVisibility != '0'}">
                                                        <c:set value="${count + 1}" var="count" />
                                                    </c:if>
                                                    <label>起始时间: </label>
                                                    <input autocomplete="off" id="${condition.aliasField}_start" name="${condition.aliasField}_start" value="${condition.defaultValue}" style="margin-top: 1px;width:100px;" onFocus="WdatePicker({onpicked:function() {},dateFmt:'${condition.formatter}'})" type="text" class="Wdate">
                                                    <c:if test="${condition.isNeed == '1'}">
                                                        <span><font color='red'>*</font></span>
                                                    </c:if>
                                                </li>
                                                <c:if test="${count % 4 == 0}">
                                                <%--<div style="padding-top:5px;"></div>--%>
                                                    <ul class="tb-ul">
                                                </c:if>
                                                <li class="tb-li" <c:if test="${condition.isVisibility == '0'}"> style="display: none;" </c:if>>
                                                    <c:if test="${condition.isVisibility != '0'}">
                                                        <c:set value="${count + 1}" var="count" />
                                                    </c:if>
                                                    <label>结束时间: </label>
                                                    <input autocomplete="off" id="${condition.aliasField}_end" name="${condition.aliasField}_end" value="${condition.defaultValueEnd}" style="margin-top: 1px;width:100px;" onFocus="WdatePicker({minDate:'#F{$dp.$D(\'${condition.aliasField}_start\')}',onpicked:function() {},dateFmt:'${condition.formatter}'})" type="text" class="Wdate">
                                                    <c:if test="${condition.isNeed == '1'}">
                                                        <span><font color='red'>*</font></span>
                                                    </c:if>
                                                </li>
                                            </c:when>
                                            <c:when test="${condition.conditionType == '5'}">  <!--查询类型 - 树-->
                                                <li class="tb-li" <c:if test="${condition.isVisibility == '0'}"> style="display: none;" </c:if>>
                                                    <c:if test="${condition.isVisibility != '0'}">
                                                        <c:set value="${count + 1}" var="count" />
                                                    </c:if>
                                                    <label>${empty condition.aliasName ? condition.name : condition.aliasName}:</label>
                                                    <input type="text" autocomplete="off" name="${condition.aliasField}" id="${condition.aliasField}Id" value="${condition.defaultName}" style="width:100px;height:24px;font-size:12px;" onclick="selectMyOrgTree('${rptId}','${condition.aliasField}','${condition.treeDim.rightParam}','${condition.treeDim.parentRightParam}','${condition.treeDim.needSearch}','${condition.aliasField}Id','hid_${condition.aliasField}','${condition.multiTreeMode}');">
                                                    <input type="hidden" name="${condition.aliasField}s" id="hid_${condition.aliasField}" value="'${condition.defaultValue}'">
                                                    <c:if test="${condition.dynamicFormat == 'formatType'}">
                                                        <span name="formatType">${condition.countType}</span>
                                                    </c:if>
                                                    <span>${condition.unit}</span>
                                                    <c:if test="${condition.isNeed == '1'}">
                                                        <span><font color='red'>*</font></span>
                                                    </c:if>
                                                </li>
                                            </c:when>
                                            <c:when test="${condition.conditionType == '6'}">  <!-- 查询类型-值区间-->
                                                <li class="tb-li" <c:if test="${condition.isVisibility == '0'}"> style="display: none;" </c:if>>
                                                    <c:if test="${condition.isVisibility != '0'}">
                                                        <c:set value="${count + 1}" var="count" />
                                                    </c:if>
                                                    <label>${empty condition.aliasName ? condition.name : condition.aliasName}:</label>
                                                    <input class="easyui-textbox" id="${condition.aliasField}_start" value="${condition.defaultValue}" format="${condition.dynamicFormat}" numberFomat="${condition.numberFormat}" style="width:50px;height:25px">
                                                    <c:if test="${condition.isNeed == '1'}">
                                                        <span><font color='red'>*</font></span>
                                                    </c:if>
                                                    &nbsp;至&nbsp;
                                                    <input class="easyui-textbox" id="${condition.aliasField}_end" value="${condition.defaultValueEnd}" format="${condition.dynamicFormat}" numberFomat="${condition.numberFormat}" style="width:50px;height:25px">
                                                    <c:if test="${condition.dynamicFormat == 'formatType'}">
                                                        <span name="formatType">${condition.countType}</span>
                                                    </c:if>
                                                    <span>${condition.unit}</span>
                                                    <c:if test="${condition.isNeed == '1'}">
                                                        <span><font color='red'>*</font></span>
                                                    </c:if>
                                                </li>
                                            </c:when>
                                            <c:when test="${condition.conditionType == '7'}">  <!-- 查询类型-多选下拉框 -->
                                                <li class="tb-li" <c:if test="${condition.isVisibility == '0'}"> style="display: none;" </c:if>>
                                                    <c:if test="${condition.isVisibility != '0'}">
                                                        <c:set value="${count + 1}" var="count" />
                                                    </c:if>
                                                    <label>${empty condition.aliasName ? condition.name : condition.aliasName}:</label>
                                                    <select class="multiSelect" multiple="multiple" id="${condition.aliasField}" name="${condition.aliasField}" width="46%">
                                                        <option value="">全选</option>
                                                        <c:forEach items="${condition.optionValue}" var="option">
                                                            <option <c:if test="${condition.mutiSelectDefault[option.key]}"> selected</c:if> value="${option.key}">${option.value}</option>
                                                        </c:forEach>
                                                    </select>
                                                    <c:if test="${condition.dynamicFormat == 'formatType'}">
                                                        <span name="formatType">${condition.countType}</span>
                                                    </c:if>
                                                    <span>${condition.unit}</span>
                                                    <c:if test="${condition.isNeed == '1'}">
                                                        <span><font color='red'>*</font></span>
                                                    </c:if>
                                                </li>
                                            </c:when>
                                        </c:choose>
                                    </c:forEach>
                                    <c:if test="${count % 4 == 0}">
                                        <ul class="tb-ul">
                                    </c:if>
                                    <li class="tb-li" style="width:28%">
                                        <c:if test="${rptInfo.needQuery == '1'}">
                                            <a href="#" class="easyui-linkbutton" iconCls="icon-search" onclick="showRptInfo.analysisQuery();">查询</a>
                                        </c:if>
                                        <c:if test="${rptInfo.needImport == '1'}">
                                            <a href="#" id="exportBtn" class="easyui-linkbutton" iconCls="icon-excel" onclick="showRptInfo.analysisExcelDownLoad();">导出Excel</a>
                                        </c:if>
                                        <c:if test="${rptInfo.needOffLine == '1'}">
                                            <a href="#" id="offLineBtn" class="easyui-linkbutton" iconCls="icon-offline" onclick="showRptInfo.analysisOffLineDownLoad('${rptInfo.rptName}');">离线下载</a>
                                        </c:if>
                                        <c:if test="${rptInfo.selfDefine == '1'}">
                                            <a href="#" class="easyui-linkbutton" iconCls="icon-selfDefine" onclick="showRptInfo.analysisSelfDefine('${rptInfo.rptName}');">自定义报表</a>
                                        </c:if>
                                    </li>
                                    <c:if test="${count % 4 == 0}">
                                        </ul>
                                    </c:if>
                                </ul>
                                <%--<a href="#" class="easyui-linkbutton" iconCls="icon-search" onclick="openNewWin();">新页面查询</a>--%>
                            </div>
                        </c:otherwise>
                    </c:choose>
                </c:otherwise>
            </c:choose>
        </div>
    </div>
    
    <script type="text/javascript">

		// 数据列
		var columns = "${columns}";
		// 冻结列
		var lockColumns = "${lockColumns}";
		// 报表是否分页
		var isPage = "${rptInfo.needPage}";
        // 外部系统传入参数
        var thirdParams = "${thirdParams}";
        // 报表初始化参数
        var initConditions = "${initConditions}";
        // 是否是下钻页面
        var isDrill = "${isDrill}";

        /**
         * 表格自适应屏幕大小
         */
        window.onresize = function(){
            setTimeout(onLoadFun,300);
        }

        function onLoadFun() {
            $('#dg').datagrid('resize',{
                height:($(window).height())
            });
        }

        // 和指定的值比较，设置字体颜色
        function fontColorByValue(compareValue, lessColor, greatColor, value, row, index) {
            var value = parseFloat(value);
            var compareValue = parseFloat(compareValue);
            if(value < compareValue) {
                if(!isEmpty(lessColor)) {
                    return '<span style="color:' + lessColor + '">' + value + '</span>';
                } else {
                    return value;
                }
            } else if(value >= compareValue) {
                if(!isEmpty(greatColor)) {
                    return '<span style="color:' + greatColor + '">' + value + '</span>';
                } else {
                    return value;
                }
            }
        }

        function formatColorByValue(compareValue, lessColor, greatColor, formatter, value, row, index) {
            if(!isNaN(value)){
                var compareValue = parseFloat(compareValue);
                if(formatter == "1") { // 添加百分号
                    value = parseFloat(value).toFixed(2);
                    if(value < compareValue) {
                        if(!isEmpty(lessColor)) {
                            return '<span style="color:' + lessColor + '">' + value + '%' + '</span>';
                        } else {
                            return value + "%";
                        }
                    } else if(value >= compareValue) {
                        if(!isEmpty(greatColor)) {
                            return '<span style="color:' + greatColor + '">' + value + '%' + '</span>';
                        } else {
                            return value + "%";
                        }
                    }
                } else if(formatter == "2" || formatter.indexOf("2,") != -1) {  // 乘以100后添加百分号
                    var percentValue = value * 100;

                    var perious = 2;  // 默认精度为2
                    if(formatter.indexOf("2,") != -1) {
                        perious = parseFloat(formatter.substr(2));
                    }
                    percentValue = parseFloat(percentValue).toFixed(perious);
                    if(percentValue < compareValue) {
                        if(!isEmpty(lessColor)) {
                            return '<span style="color:' + lessColor + '">' + percentValue + '%' + '</span>';
                        } else {
                            return percentValue + "%";
                        }
                    } else if(percentValue >= compareValue) {
                        if(!isEmpty(greatColor)) {
                            return '<span style="color:' + greatColor + '">' + percentValue + '%' + '</span>';
                        } else {
                            return percentValue + "%";
                        }
                    }
                } else if(formatter.indexOf("#") != -1) {
                    if(value != null) {
                        var result = (value.toString()).indexOf(".");
                        if(result != -1) {
                            var fixNumber = formatter.length;
                            value = parseFloat(value).toFixed(fixNumber);
                        }

                        if(value < compareValue) {
                            if(!isEmpty(lessColor)) {
                                return '<span style="color:' + lessColor + '">' + value + '</span>';
                            } else {
                                return value;
                            }
                        } else if(value >= compareValue) {
                            if(!isEmpty(greatColor)) {
                                return '<span style="color:' + greatColor + '">' + value + '</span>';
                            } else {
                                return value;
                            }
                        }
                    }
                } else if(formatter.indexOf("0.") != -1) {
                    if(value != null) {
                        var baseNumber = parseFloat(formatter);
                        var result = value * baseNumber;
                        result = result.toFixed(2);

                        if(result < compareValue) {
                            if(!isEmpty(lessColor)) {
                                return '<span style="color:' + lessColor + '">' + result + '</span>';
                            } else {
                                return result;
                            }
                        } else if(result >= compareValue) {
                            if(!isEmpty(greatColor)) {
                                return '<span style="color:' + greatColor + '">' + result + '</span>';
                            } else {
                                return result;
                            }
                        }
                    }
                }
            }
        }

        // 和指定值区间比较，设置字体颜色
        function fontColorByRange(startValue, endValue, lessColor, rangeColor, greatColor, value, row, index) {
            var value = parseFloat(value);
            var startValue = parseFloat(startValue);
            var endValue = parseFloat(endValue);
            if(value < startValue) {
                if(!isEmpty(lessColor)) {
                    return '<span style="color:' + lessColor + '">' + value + '</span>';
                } else {
                    return value;
                }
            } else if(value >= startValue && value < endValue) {
                if(!isEmpty(rangeColor)) {
                    return '<span style="color:' + rangeColor + '">' + value + '</span>';
                } else {
                    return value;
                }
            } else if(value >= endValue) {
                if(!isEmpty(greatColor)) {
                    return '<span style="color:' + greatColor + '">' + value + '</span>';
                } else {
                    return value;
                }
            }
        }

        function formatColorByRange(startValue, endValue, lessColor, rangeColor, greatColor, formatter, value, row, index) {
            if(!isNaN(value)){
                var startValue = parseFloat(startValue);
                var endValue = parseFloat(endValue);
                if(formatter == "1") { // 添加百分号
                    value = parseFloat(value).toFixed(2);
                    if(value < startValue) {
                        if(!isEmpty(lessColor)) {
                            return '<span style="color:' + lessColor + '">' + value + '%' + '</span>';
                        } else {
                            return value + "%";
                        }
                    } else if(value >= startValue && value < endValue){
                        if(!isEmpty(rangeColor)) {
                            return '<span style="color:' + rangeColor + '">' + value + '%' + '</span>';
                        } else {
                            return value + "%";
                        }
                    } else if(value >= endValue) {
                        if(!isEmpty(greatColor)) {
                            return '<span style="color:' + greatColor + '">' + value + '%' + '</span>';
                        } else {
                            return value + "%";
                        }
                    }
                } else if(formatter == "2" || formatter.indexOf("2,") != -1) {  // 乘以100后添加百分号
                    var percentValue = value * 100;

                    var perious = 2;  // 默认精度为2
                    if(formatter.indexOf("2,") != -1) {
                        perious = parseFloat(formatter.substr(2));
                    }
                    percentValue = parseFloat(percentValue).toFixed(perious);
                    if(percentValue < startValue) {
                        if(!isEmpty(lessColor)) {
                            return '<span style="color:' + lessColor + '">' + percentValue + '%' + '</span>';
                        } else {
                            return percentValue + "%";
                        }
                    } else if(percentValue >= startValue && percentValue < endValue ) {
                        if(!isEmpty(rangeColor)) {
                            return '<span style="color:' + rangeColor + '">' + percentValue + '%' + '</span>';
                        } else {
                            return percentValue + "%";
                        }
                    } else if(percentValue >= endValue) {
                        if(!isEmpty(greatColor)) {
                            return '<span style="color:' + greatColor + '">' + percentValue + '%' + '</span>';
                        } else {
                            return percentValue + "%";
                        }
                    }
                } else if(formatter.indexOf("#") != -1) {
                    if(value != null) {
                        var result = (value.toString()).indexOf(".");
                        if(result != -1) {
                            var fixNumber = formatter.length;
                            value = parseFloat(value).toFixed(fixNumber);
                        }

                        if(value < startValue) {
                            if(!isEmpty(lessColor)) {
                                return '<span style="color:' + lessColor + '">' + value + '</span>';
                            } else {
                                return value;
                            }
                        } else if(value >= startValue && value < endValue) {
                            if(!isEmpty(rangeColor)) {
                                return '<span style="color:' + rangeColor + '">' + value + '</span>';
                            } else {
                                return value;
                            }
                        } else if(value >= endValue) {
                            if(!isEmpty(greatColor)) {
                                return '<span style="color:' + greatColor + '">' + value + '</span>';
                            } else {
                                return value;
                            }
                        }
                    }
                } else if(formatter.indexOf("0.") != -1) {
                    if(value != null) {
                        var baseNumber = parseFloat(formatter);
                        var result = value * baseNumber;
                        result = result.toFixed(2);

                        if(result < startValue) {
                            if(!isEmpty(lessColor)) {
                                return '<span style="color:' + lessColor + '">' + result + '</span>';
                            } else {
                                return result;
                            }
                        } else if(result >= startValue && result < endValue) {
                            if(!isEmpty(rangeColor)) {
                                return '<span style="color:' + rangeColor + '">' + result + '</span>';
                            } else {
                                return result;
                            }
                        } else if(result >= endValue) {
                            if(!isEmpty(greatColor)) {
                                return '<span style="color:' + greatColor + '">' + result + '</span>';
                            } else {
                                return result;
                            }
                        }
                    }
                }
            }
        }

        // 和指定的列值比较，设置字体颜色
        function fontColorByRow(compareRow, lessColor, greatColor, value, row, index) {
            var rowValue = row[compareRow];
            var rowValue = parseFloat(rowValue);
            var value = parseFloat(value);
            if(value < rowValue) {
                if(!isEmpty(lessColor)) {
                    return '<span style="color:' + lessColor + '">' + value + '</span>';
                } else {
                    return value;
                }
            } else if(value >= rowValue) {
                if(!isEmpty(greatColor)) {
                    return '<span style="color:' + greatColor + '">' + value + '</span>';
                } else {
                    return value;
                }
            }
        }

        function formatColorByRow(compareRow, lessColor, greatColor, formatter, value, row, index) {
            if(!isNaN(value)){
                var compareValue = row[compareRow];
                var compareValue = parseFloat(compareValue);
                if(formatter == "1") { // 添加百分号
                    value = parseFloat(value).toFixed(2);
                    if(value < compareValue) {
                        if(!isEmpty(lessColor)) {
                            return '<span style="color:' + lessColor + '">' + value + '%' + '</span>';
                        } else {
                            return value + "%";
                        }
                    } else if(value >= compareValue) {
                        if(!isEmpty(greatColor)) {
                            return '<span style="color:' + greatColor + '">' + value + '%' + '</span>';
                        } else {
                            return value + "%";
                        }
                    }
                } else if(formatter == "2" || formatter.indexOf("2,") != -1) {  // 乘以100后添加百分号
                    var percentValue = value * 100;

                    var perious = 2;  // 默认精度为2
                    if(formatter.indexOf("2,") != -1) {
                        perious = parseFloat(formatter.substr(2));
                    }
                    percentValue = parseFloat(percentValue).toFixed(perious);
                    if(percentValue < compareValue) {
                        if(!isEmpty(lessColor)) {
                            return '<span style="color:' + lessColor + '">' + percentValue + '%' + '</span>';
                        } else {
                            return percentValue + "%";
                        }
                    } else if(percentValue >= compareValue) {
                        if(!isEmpty(greatColor)) {
                            return '<span style="color:' + greatColor + '">' + percentValue + '%' + '</span>';
                        } else {
                            return percentValue + "%";
                        }
                    }
                } else if(formatter.indexOf("#") != -1) {
                    if(value != null) {
                        var result = (value.toString()).indexOf(".");
                        if(result != -1) {
                            var fixNumber = formatter.length;
                            value = parseFloat(value).toFixed(fixNumber);
                        }

                        if(value < compareValue) {
                            if(!isEmpty(lessColor)) {
                                return '<span style="color:' + lessColor + '">' + value + '</span>';
                            } else {
                                return value;
                            }
                        } else if(value >= compareValue) {
                            if(!isEmpty(greatColor)) {
                                return '<span style="color:' + greatColor + '">' + value + '</span>';
                            } else {
                                return value;
                            }
                        }
                    }
                } else if(formatter.indexOf("0.") != -1) {
                    if(value != null) {
                        var baseNumber = parseFloat(formatter);
                        var result = value * baseNumber;
                        result = result.toFixed(2);

                        if(result < compareValue) {
                            if(!isEmpty(lessColor)) {
                                return '<span style="color:' + lessColor + '">' + result + '</span>';
                            } else {
                                return result;
                            }
                        } else if(result >= compareValue) {
                            if(!isEmpty(greatColor)) {
                                return '<span style="color:' + greatColor + '">' + result + '</span>';
                            } else {
                                return result;
                            }
                        }
                    }
                }
            }
        }

        //报表下钻
        function rptDrill(rptId, drillParam, conditionParam, firstCol, needSum, value, row, index) {
            rptId = rptId + "encode";
            rptId = encode64(rptId);
            rptId = encode64(rptId);

            var newRptURL = basePath + "/rptTools/showRpt/showRptIndex";
            var reqParam = "";
            var params = new Array();
            var conditions = new Array();
            var paramJSON = {};
            params = drillParam.split(",");
            for(i=0; i<params.length; i++) {
                var paramName = params[i];
                var paramValue = row[paramName];
                paramJSON[paramName] = paramValue;

                /*if(reqParam != '') {
                    reqParam = reqParam + "&" + paramName + "=" + paramValue
                } else {
                    reqParam = reqParam + paramName + "=" + paramValue
                }*/
            }
            conditions = conditionParam.split(",");
            for(i=0; i<conditions.length; i++) {
                var paramName = conditions[i];
                var paramValue = $("#" + paramName).val();
                var format = $("#" + paramName).attr("format");
                var numberFormat = $("#" + paramName).attr("numberFomat");
                var formatType = $("#formatType").val();
                if(format == 'formatType' && paramValue != '') {
                    if(formatType != '' && typeof(formatType) != "undefined") {
                        if(formatType.indexOf("0.") != -1) {
                            var nodeLength = formatType.length - 2;
                            if(nodeLength == 1) {
                                paramValue = paramValue * 10;
                            } else if(nodeLength == 2) {
                                paramValue = paramValue * 100;
                            } else if(nodeLength == 3) {
                                paramValue = paramValue * 1000;
                            } else if(nodeLength == 4) {
                                paramValue = paramValue * 10000;
                            }
                        }
                    }
                }
                if(numberFormat != '' && paramValue != '') {
                    if(numberFormat == '2') {
                        paramValue = paramValue / 100;
                    }
                }

                var drillValue = paramJSON[paramName];
                if(!paramJSON.hasOwnProperty(paramName)) {
                    paramJSON[paramName] = paramValue;
                } else {
                    if(drillValue == '' || typeof(drillValue) == "undefined") {
                        paramJSON[paramName] = paramValue;
                    }
                }
                /*if(reqParam != '') {
                    reqParam = reqParam + "&" + paramName + "=" + paramValue
                } else {
                    reqParam = reqParam + paramName + "=" + paramValue
                }*/
            }

            /*if(reqParam != "") {
                newRptURL = newRptURL + "?" + reqParam;
            }*/
            var token = $("#rptToken").val();
            var params = JSON.stringify(paramJSON).replace(/"/g, '&quot;');  // 双引号转义
            params = params.replace(/'/g, '');
            if(!isEmpty(value)) {
                return '<a style="color:#4697e5; text-decoration:none;" onclick=\"drillEvent(\'' + newRptURL + '\',\'' + index + '\',\'' + needSum + '\',\'' + token + '\',\'' + rptId + '\',\'' + params + '\')\" href="javascript:void(0)">' + value + '</a>';
            } else {
                return '';
            }
            //return "<a style='color:#4697e5; text-decoration:none;' onclick='' href=\"" + newRptURL + "\" target='_blank'>" + value + "</a>";
        }
        
        function isEmpty(obj) {
            if(typeof obj == "undefined" || obj == null || obj === ""){
                return true;
            }else{
                return false;
            }
        }

        function drillEvent(rptURL, rowNum, needSum, token, rptId, paramJSON) {
            paramJSON = JSON.parse(paramJSON);

            // 第三方接入系统的用户ID
            var userId = $("#userId").val();
            var userKey = $("#userKey").val();

            // 第三方接入系统的系统编码
            var itemCode = $("#itemCode").val();

            // 对于汇总行的下钻需特殊处理
            var rows = $("#dg").datagrid('getRows');
            var rowLen = rows.length - 1;
            var sumRow = false;
            if(rowLen == rowNum && needSum == '1') {
                sumRow = true;
            }

            var form = $("<form>");//定义一个form表单
            form.attr("id", "drillForm");
            form.attr("style", "display:none");
            form.attr("target", "");
            form.attr("method", "post");
            form.attr("action", rptURL);

            var tokenInput = $("<input>");
            tokenInput.attr("type", "hidden");
            tokenInput.attr("name", "token");
            tokenInput.attr("id", "token");
            tokenInput.attr("value", token);
            form.append(tokenInput);

            var rptIdInput = $("<input>");
            rptIdInput.attr("type", "hidden");
            rptIdInput.attr("name", "rptId");
            rptIdInput.attr("id", "rptId");
            rptIdInput.attr("value", rptId);
            form.append(rptIdInput);

            var userInput = $("<input>");
            userInput.attr("type", "hidden");
            userInput.attr("name", userKey);
            userInput.attr("id", userKey);
            userInput.attr("value", userId);
            form.append(userInput);

            var sysInput = $("<input>");
            sysInput.attr("type", "hidden");
            sysInput.attr("name", "itemCode");
            sysInput.attr("id", "itemCode");
            sysInput.attr("value", itemCode);
            form.append(sysInput);

            var isDirll = $("<input>");
            isDirll.attr("type", "hidden");
            isDirll.attr("name", "isDirll");
            isDirll.attr("id", "isDirll");
            isDirll.attr("value", "1");
            form.append(isDirll);

            // 获取选中的维度
            var dim_array=new Array();
            $('input[name="rptDim"]:checked').each(function(){
                dim_array.push($(this).val());//向数组中添加元素
            });
            if(dim_array.length == 0) {
                $('input[name="rptDim"]').each(function(){
                    dim_array.push($(this).val());//向数组中添加元素
                });
            }
            var firstCol = dim_array[0];

            $.each(paramJSON, function (name, value) {
                var reqValue = value;

                var index = dim_array.indexOf(name);
                if(index > -1) {
                    dim_array.splice(index, 1);
                    if(sumRow && name == firstCol) {
                        reqValue = '';
                    }
                }

                var paramInput = $("<input>");
                paramInput.attr("type", "hidden");
                paramInput.attr("name", name);
                paramInput.attr("id", name);
                paramInput.attr("value", reqValue);
                form.append(paramInput);
            });

            $.each(dim_array,function(index,value){
                var reqValue = 'NULL';
                if(sumRow) {
                    reqValue = '';
                }
                var paramInput = $("<input>");
                paramInput.attr("type", "hidden");
                paramInput.attr("name", value);
                paramInput.attr("id", value);
                paramInput.attr("value", reqValue);
                form.append(paramInput);
            });

            // 第三方传入的参数传递给下钻页面
            var thirdParam = eval('(' + thirdParams + ')');
            $.each(thirdParam, function (index, obj) {
                var paramName = obj.paramName;
                var paramValue = obj.paramValue;
                var thirdInput = $("<input>");
                thirdInput.attr("type", "hidden");
                thirdInput.attr("name", paramName);
                thirdInput.attr("id", paramName);
                thirdInput.attr("value", paramValue);
                form.append(thirdInput);
            });

            $("body").append(form);//将表单放置在web中
            form.attr('target', '_blank');
            form.submit();//表单提交
        }

        function encode64(input) {
            input = input + "";
            var keyStr = "ABCDEFGHIJKLMNOP" + "QRSTUVWXYZabcdef" + "ghijklmnopqrstuv" + "wxyz0123456789+/" + "=";
            var output = "";
            var chr1, chr2, chr3 = "";
            var enc1, enc2, enc3, enc4 = "";
            var i = 0;
            do {
                chr1 = input.charCodeAt(i++);
                chr2 = input.charCodeAt(i++);
                chr3 = input.charCodeAt(i++);
                enc1 = chr1 >> 2;
                enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
                enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
                enc4 = chr3 & 63;
                if (isNaN(chr2)) {
                    enc3 = enc4 = 64;
                } else if (isNaN(chr3)) {
                    enc4 = 64;
                }
                output = output + keyStr.charAt(enc1) + keyStr.charAt(enc2)
                        + keyStr.charAt(enc3) + keyStr.charAt(enc4);
                chr1 = chr2 = chr3 = "";
                enc1 = enc2 = enc3 = enc4 = "";
            } while (i < input.length);
            return output;
        }

        //数字格式化
        function numberFormat(formatter, value, row, index) {
            if(!isNaN(value)){
                if(formatter == "1") { // 添加百分号
                    value = parseFloat(value).toFixed(2);
                    return value + "%";
                } else if(formatter == "2" || formatter.indexOf("2,") != -1) {  // 乘以100后添加百分号
                    var percentValue = value * 100;

                    var perious = 2;  // 默认精度为2
                    if(formatter.indexOf("2,") != -1) {
                        perious = parseFloat(formatter.substr(2));
                    }
                    percentValue = parseFloat(percentValue).toFixed(perious);
                    percentValue = percentValue + "%";
                    return percentValue;
                } else if(formatter.indexOf("#") != -1) {
                    if(value != null) {
                        var result = (value.toString()).indexOf(".");
                        if(result != -1) {
                            var fixNumber = formatter.length;
                            value = parseFloat(value).toFixed(fixNumber);
                        }
                        return value;
                    }
                } else if(formatter.indexOf("0.") != -1) {
                    if(value != null) {
                        var baseNumber = parseFloat(formatter);
                        var result = value * baseNumber;
                        result = result.toFixed(2);
                        return result;
                    }
                }
            }
        }

        //动态数字格式化
        function dynamicNumberFormat(formatter, value, row, index) {
            if(!isNaN(value)){
                var formatType = $("#" + formatter).val();
                if(formatType == "1") { // 添加百分号
                    value = parseFloat(value).toFixed(2);
                    return value + "%";
                } else if(formatType == "2" || formatter.indexOf("2,") != -1) {  // 乘以100后添加百分号
                    var percentValue = value * 100;

                    var perious = 2;  // 默认精度为2
                    if(formatter.indexOf("2,") != -1) {
                        perious = parseFloat(formatter.substr(2));
                    }
                    percentValue = parseFloat(percentValue).toFixed(perious);
                    percentValue = percentValue + "%";
                    return percentValue;
                } else if(formatType.indexOf("#") != -1) {
                    if(value != null) {
                        var result = (value.toString()).indexOf(".");
                        if(result != -1) {
                            var fixNumber = formatType.length;
                            value = parseFloat(value).toFixed(fixNumber);
                        }
                        return value;
                    }
                } else if(formatType.indexOf("0.") != -1) {
                    if(value != null) {
                        var baseNumber = parseFloat(formatType);
                        var result = value * baseNumber;
                        result = result.toFixed(2);
                        return result;
                    }
                }
            }
        }

        // 转义(将编码转为名称)
        function transInfo(field, value, row, index) {
            var text = "";
            $("#" + field + " option").each(function(){  //遍历所有option
                var opt = $(this).val();   //获取option值
                var optTxt = $(this).text();
                if(value == opt) {
                    text = optTxt;
                    return;
                }
            });

            return text;
        }

        function openNewWin() {
            var monthCode = $('#monthCode').val();
            var custCode = $("#custCode").val();
            var orgCodes = $("#hid_treeNode").val();
            var orgNames = $("#treeNodeId").val();
            orgNames = encodeURI(encodeURI(orgNames));
            var rcvProvCode = $("#hid_rcvProvCode").val();
            var rcvProvNames = $("#rcvProvCodeId").val();
            rcvProvNames = encodeURI(encodeURI(rcvProvNames));
            window.open("${pageContext.request.contextPath}/rest/auts/flightRcv/index?monthCode=" + monthCode + "&custCode=" + custCode + "&orgCodes=" + orgCodes + "&orgNames=" + orgNames + "&rcvProvCode=" + rcvProvCode + "&rcvProvNames=" + rcvProvNames);
        }

        var treeWinDig;
        function selectMyOrgTree(rptId,attrName,paramKey,parentParamKey,needSearch,nameId,valueId,multiTreeMode){
            var paramValue = $("#" + paramKey).val();
            var parentValue = $("#" + parentParamKey).val();
            var selfDefineName = $("#" + nameId).val();
            var selfDefineValue = $("#" + valueId).val();
            if(!isEmpty(selfDefineValue)) {
                selfDefineValue = selfDefineValue.replace(/'/g, '');
            }
            var url = basePath + "/rptTools/treeData/tree/" + attrName + "/" + rptId + "/" + paramValue + "/" + parentValue + "/" + needSearch + "?multiTreeMode=" + multiTreeMode + "&selfDefineValue=" + selfDefineValue + "&selfDefineName=" + encodeURI(encodeURI(selfDefineName));
            //var url = basePath + "/rptTools/treeData/tree/" + attrName + "/" + rptId + "/" + paramValue + "/" + parentValue + "/" + needSearch;
            /*var url = "";
            if(paramValue != '' && parentValue != '') {
                url = basePath + "/rptTools/treeData/tree/" + attrName + "/" + rptId + "/" + paramValue + "/" + parentValue;
            } else if(paramValue != '') {
                url = basePath + "/rptTools/treeData/tree/" + attrName + "/" + rptId + "/" + paramValue;
            } else if(parentValue != '') {
                url = basePath + "/rptTools/treeData/tree/" + attrName + "/" + rptId + "/" + parentValue;
            } else {
                url = basePath + "/rptTools/treeData/tree/" + attrName + "/" + rptId;
            }*/
            treeWinDig = popWinOpenAjaxFrame(rptId,'选择',url,650,490);
        }

        function treeDataBack(key1,key2,value1,value2) {
            if(value2 != null && value2 != ''){
                value2 = "'" + value2.replace(new RegExp(',','gm'),"','") + "'";
            }

            $("#"+key1).val(value1);
            $("#"+key2).val(value2);
            treeWinDig.close();
        }

        function getFormValue(key) {
            var paramValue = $("#" + key).val();
            return paramValue;
        }
    </script>
</body>
</html>